package com.nowcoder.code.lcof;

public class JZ73 {


    public String ReverseSentence(String str) {

        if (str == null || str.isEmpty()) {
            return "";
        }
        String[] ss = str.split(" ");

        StringBuilder sb = new StringBuilder();
        for (int i = ss.length - 1; i >= 0; i--) {
            sb.append(ss[i]).append(" ");
        }
        return sb.toString().trim();

    }


}
